Asynchronously begins executing a task. Namespace: Microsoft.EnterpriseManagement
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)

Usage

Visual Basic
Dim instance As ManagementGroup
Dim targets As ICollection(Of T)
Dim task As MonitoringTask
Dim configuration As MonitoringTaskConfiguration
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginExecuteMonitoringTask(targets, task, configuration, callback, state)

Syntax

Visual Basic
Public Function BeginExecuteMonitoringTask(Of T As PartialMonitoringObject) ( _
		targets As ICollection(Of T), _
		task As MonitoringTask, _
		configuration As MonitoringTaskConfiguration, _
		callback As AsyncCallback, _
		state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginExecuteMonitoringTask<T> (
		ICollection<T> targets,
		MonitoringTask task,
		MonitoringTaskConfiguration configuration,
		AsyncCallback callback,
		Object state
) where T : PartialMonitoringObject
C++
public:
generic<typename T> where T : PartialMonitoringObject
IAsyncResult^ BeginExecuteMonitoringTask (
		ICollection<T>^ targets, 
		MonitoringTask^ task, 
		MonitoringTaskConfiguration^ configuration, 
		AsyncCallback^ callback, 
		Object^ state
)
J#

JScript

Parameters

targets

The monitoring objects the task targets.

task

The task to begin executing.

configuration

The configuration of the task.

callback

The callback method that gets called when the task completes.

state

The optional state to pass back to the callback method.

Return Value

An IAsyncResult object.

Example

For an example of the BeginExecuteMonitoringTask method, see How to Asynchronously Run a Management Pack Task.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Target Platforms

Windows Server 2008,Windows Server 2003,Windows Vista,Windows XP

See Also